package br.ucb.jogo.enuns;

public enum EnumTypeUser {
	
	USER(1,"Usuario"), ADMIN(2,"Administrador");
	
	private Integer number;
	private String name;
	
	public static EnumTypeUser findPersonByNumber(int number){
		for (EnumTypeUser e : values()) {
			if(e.getNumber() == number)
				return e;
		}
		return null;
	}
	
	private EnumTypeUser(Integer number, String name) {
		this.name = name;
		this.number = number;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}	

}
